package com.example.app.pages.main.home.addNew.addRecord

import androidx.compose.foundation.background
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.dp
import com.example.app.components.MyChip.MyChip
import com.example.app.components.MySpacer.MySpacer
import com.example.app.components.MyText.MyText
import com.example.app.pages.main.home.addNew.addRecord.MyModalBottomSheetPlacePicker.IncomeToolListPlacePicker
import com.example.app.pages.main.home.addNew.addRecord.MyModalBottomSheetRelationPicker.IncomeToolListRelationPicker
import com.example.app.pages.main.home.me.viewModel.AddNewViewModel
import com.example.app.ui.theme.shapeMedium
import com.example.app.viewmodel.MainViewModel

@OptIn(
    ExperimentalMaterialApi::class,
    ExperimentalMaterial3Api::class
)
@Composable
fun IncomeRemarkToolList(
        placeClick: () -> Unit
) {
    Row(
        modifier = Modifier
            .clip(
                RoundedCornerShape(
                    topStart = shapeMedium,
                    topEnd = shapeMedium,
                    bottomEnd = 0.dp,
                    bottomStart = 0.dp
                )
            )
            .fillMaxWidth()
            .horizontalScroll(rememberScrollState())
            .background(MaterialTheme.colorScheme.background)
            .fillMaxWidth(),
        verticalAlignment = Alignment.CenterVertically,
        horizontalArrangement = Arrangement.Start
    ) {
        //时间日期选择器
        IncomeToolListDatePicker()
        MySpacer(modifier = Modifier.width(12.dp))
        //关系选择
        IncomeToolListRelationPicker(

        )
        MySpacer(modifier = Modifier.width(12.dp))

        IncomeToolListPlacePicker(
            clickHandler = placeClick
        )
    }
}